

using System;
using System.Data;
using System.Diagnostics;
using System.Xml;
using System.ComponentModel;
using System.Collections;
using System.IO;


using CStock;
using CUtil;
using CIndicators;




//problem
//the path var.is not set after deserialization !

//TODO
//Value_Total is not reflecting the current value of the portfolio (Because it would mean an update - and reading 
//of all share data at start
//to update - call Value_TotalUpdate
namespace CStock
{
	[System.Xml.Serialization.XmlRoot()]
	public class ConfigurationFactory : Factory 
    {
		#region fields


        IConfiguration configuration;

		#endregion



        public ConfigurationFactory()
		{
            configuration = new Configuration();
            configuration.ID = "Configuration";

            this.stockObjectBase = configuration as StockObjectBase;
            
        }

     

        public override bool Create_TestData()
        {
            base.Create_TestData();

            Debug.Assert(false, "Not implemented");

            return true;

        }

      
        public static bool AddTestData(int i)
        {
            return true;

        }
        /// <summary>
        /// attention - new object variable for dataClass!!
        /// </summary>
        /// <returns></returns>
        public override bool DeSerialize()
        {
            if (base.DeSerialize())
            {
                this.configuration = this.stockObjectBase as IConfiguration;
                return true;
            }
            return false;

        }

     
	}
}
